﻿<%@ Page  Title="" Language="C#" 
    MasterPageFile="~/Medianamik/MasterPages/MedianamikModalWindow.Master" 
    AutoEventWireup="true" CodeBehind="DocumentUploaderWindow.aspx.cs" 
    Inherits="Medianamik.UI.Web.ModalWindows.DocumentUploaderWindow" %>

<asp:Content ID="HeaderContentHolder" runat="server" ContentPlaceHolderID="HeaderContentHolder">
<telerik:RadScriptBlock runat="server" ID="scriptBlock">
	<script type="text/javascript">
        //<![CDATA[
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function Cancel_Clicked()
        {
            var oWindow = GetRadWindow();
            oWindow.argument = null;
            oWindow.Close();
        }

        function closeWindow(nodeId, name, path) {
            var arg = new Object();
            arg.nodeId = nodeId;
            arg.name = name;
            arg.path = path;
            var oWindow = GetRadWindow();
            oWindow.Close(arg);
        }
        //]]>            
	</script>
	</telerik:RadScriptBlock>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:ScriptManager ID="MedianamikScriptManager" EnableHistory="true" EnablePageMethods="true" runat="server"  EnablePartialRendering="true" ScriptMode="Release" />
	<asp:Label ID="mesageLiteral" runat="server" Visible="false" CssClass="TxtErreur" EnableViewState="false" />
    <asp:PlaceHolder ID="main" runat="server">
	    <fieldset>
            <asp:CustomValidator runat="server" OnServerValidate="UploadServerValidate"
                Display="Dynamic" ><p><asp:Literal runat="server" Text="<%$ Resources: Medianamik_DocumentManagement, InvalidFileExtension %>" /></p></asp:CustomValidator>
            <p><asp:Literal ID="textLabel" runat="server" Text="<%$ Resources: Medianamik_ResourceManagement, SelectImportResource %>" /></p>
	        <p><telerik:radupload id="RadUpload" runat="server" initialfileinputscount="1" skin="Vista"
	                maxfileinputscount="1" InputSize="50" Width="100%" ControlObjectsVisibility="None"
                    OverwriteExistingFiles="false"  /><br />
                <asp:Button ID="importButton" runat="server" OnClick="Import" Text="<%$ Resources: Medianamik_DocumentManagement, ImportDocumentButton %>" class="Btn" />&nbsp;
	            <input type="button" class="Btn" value="<%=Resources("Medianamik_Global", "Cancel") %>" onclick="Cancel_Clicked();" /></p>
	    </fieldset>
	</asp:PlaceHolder>
</asp:Content>